package com.jfinal.weixin.controller;

import com.jfinal.core.Controller;
import com.jfinal.weixin.entity.DianYing;
import com.jfinal.weixin.util.DianYingUtil;

import java.util.ArrayList;

public class DianYingController extends Controller {
    public String index(){
        String vod_id=this.getPara("vod_id");
        DianYing dy= DianYingUtil.getDetail(vod_id);
        //解析集数
        String play_url=dy.getVod_paly_url();
        String[] playurls=play_url.split("\\$\\$\\$");
        String[] n_play=playurls[1].split("#");
//        System.out.println(n_play);

        ArrayList list=new ArrayList();

        for (int i=0;i<n_play.length;i++){
            String nn=n_play[i].split("\\$")[1];


            list.add(nn);
        }
        this.setAttr("dylist",list);
        return "index";
    }
}
